Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed blank response header error #4

Merged
merged 5 commits into from
Nov 17, 2023

Conversation

krytenuk
Copy link
Contributor

I found an issue when Coilpack processes the response headers.

The headers are split into an array with explode. If the header is blank, just contains the header-name: then the response will attempt to access the value, array key 1, resulting in undefined array key error as it does not exist. Also the blank header name, array key 0, still has the original header names colon suffixed.

I simply removed the trailing colon from the name and set array key 1 to an empty string when the header array does not contain two elements.

@bryannielsen
Copy link
Contributor

@krytenuk this looks great, thanks for submitting! I reworked it a little bit but let me know if that doesn't match with what you intended. I'm preparing a release soon and would love to get this fix included

@krytenuk
Copy link
Contributor Author

@bryannielsen I have pulled your improvements and they seem to be working a treat. All fine on my local and working as expected.

@bryannielsen bryannielsen merged commit 74926ec into ExpressionEngine:1.x Nov 17, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants